import request from '../utils/request';
import { createTheURL } from '../utils/utils';
import { API } from '../config/api';


// 获取用户信息
export async function getUser(params) {
  return request(createTheURL(API.userAPI, 'get'), {
    method: 'PUT',
    body: {
      ...params,
    },
  });
}

// 修改用户信息
export async function editUser(params) {
  return request(createTheURL(API.userAPI, 'edit'), {
    method: 'PUT',
    body: {
      ...params,
    },
  });
}
// 添加用户信息
export async function addUser(params) {
  return request(createTheURL(API.userAPI, 'add'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
